.mission-control {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  max-height: calc(100vh - 40px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  z-index: 1000;
}

.mission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mission-header:hover {
  background: rgba(52, 152, 219, 0.1);
  border-radius: 6px;
  padding: 15px;
  margin: -15px -15px 20px -15px;
}

.collapse-arrow {
  color: #3498db;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.collapse-arrow.collapsed {
  transform: rotate(-90deg);
}

.mission-content {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
}

.mission-header h2 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 1.4em;
  text-align: center;
}

.control-tabs {
  display: flex;
  gap: 5px;
}

.tab {
  flex: 1;
  padding: 8px 16px;
  border: 1px solid #bdc3c7;
  background: #ecf0f1;
  color: #2c3e50;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.tab.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.tab:hover:not(.active) {
  background: #d5dbdb;
}

.mission-section {
  margin-bottom: 20px;
}

.mission-section h3 {
  margin: 0 0 12px 0;
  color: #34495e;
  font-size: 1.1em;
  border-left: 3px solid #3498db;
  padding-left: 10px;
}

.mission-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.mission-filter label {
  font-size: 0.9em;
  color: #2c3e50;
  font-weight: 500;
}

.mission-filter select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #bdc3c7;
  border-radius: 6px;
  background: white;
  font-size: 0.9em;
}

.mission-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ecf0f1;
  border-radius: 6px;
}

.mission-item {
  padding: 12px;
  border-bottom: 1px solid #ecf0f1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mission-item:hover {
  background: #f8f9fa;
}

.mission-item.selected {
  background: #e3f2fd;
  border-left: 4px solid #3498db;
}

.mission-item:last-child {
  border-bottom: none;
}

.mission-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95em;
}

.mission-type {
  font-size: 0.8em;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 500;
}

.mission-duration {
  font-size: 0.8em;
  color: #95a5a6;
}

.mission-details {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #ecf0f1;
}

.mission-details h4 {
  margin: 0 0 8px 0;
  color: #2c3e50;
}

.mission-details p {
  margin: 0 0 12px 0;
  color: #34495e;
  font-size: 0.9em;
  line-height: 1.4;
}

.mission-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mission-stats span {
  font-size: 0.8em;
  color: #7f8c8d;
}

.mission-controls,
.flight-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.control-btn.start {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
}

.control-btn.stop {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.control-btn.takeoff {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.control-btn.land {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.control-btn.emergency {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: 2px solid #c0392b;
}

.control-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.movement-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.control-instructions {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  border-left: 4px solid #3498db;
}

.control-instructions p {
  margin: 0 0 8px 0;
  font-weight: 600;
  color: #2c3e50;
}

.control-instructions ul {
  margin: 0;
  padding-left: 20px;
  color: #34495e;
}

.control-instructions li {
  font-size: 0.85em;
  margin-bottom: 4px;
}

.control-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.control-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.movement-btn {
  width: 80px;
  height: 40px;
  border: 1px solid #bdc3c7;
  background: #ecf0f1;
  color: #2c3e50;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: 500;
  transition: all 0.2s ease;
  user-select: none;
}

.movement-btn:hover {
  background: #d5dbdb;
  transform: translateY(-1px);
}

.movement-btn:active {
  background: #3498db;
  color: white;
  transform: translateY(0);
}

/* Scrollbar styling */
.mission-control::-webkit-scrollbar,
.mission-list::-webkit-scrollbar {
  width: 6px;
}

.mission-control::-webkit-scrollbar-track,
.mission-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.mission-control::-webkit-scrollbar-thumb,
.mission-list::-webkit-scrollbar-thumb {
  background: #bdc3c7;
  border-radius: 3px;
}

.mission-control::-webkit-scrollbar-thumb:hover,
.mission-list::-webkit-scrollbar-thumb:hover {
  background: #95a5a6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mission-control {
    position: relative;
    bottom: 0;
    right: 0;
    width: 100%;
    max-height: none;
    margin: 20px 0;
    border-radius: 0;
  }

  .control-grid {
    transform: scale(0.9);
  }

  .movement-btn {
    width: 70px;
    height: 35px;
    font-size: 0.75em;
  }
}
